<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core">

<h:head>
	<h:outputStylesheet name="rh.css" library="css" />
	<h:outputScript library="js" name="rh.js" />
</h:head>
<h:body>

	<div id="tudo">
		<div id="bordaTopoGeral"></div>
		<div id="geral">
			<div id="logo">
				<a href="default.jsf"><img src="../resources/images/cabecalho1.png"
					border="0" /></a>
			</div>
			<div id="espacamentoMenuCima">
				<ui:include src="../template/menu.xhtml" />
			</div>
			<div id="conteudo1">
				<ui:insert name="conteudo">
					<!--<div id="menu1">menu</div> -->
					<div id="bannerGrande">
						<!-- <ui:insert name="bannerGrande"> -->
						<h:form id="formCadastro">
				
							<!-- DADOS PESSOAIS -->
							<p:panel id="panelDadosPessoais" header="Dados Pessoais" style="margin-bottom:10px;width:970px;">
								<p:messages id="messages" />
								<h:panelGrid columns="2" border="0">
									<h:outputLabel for="nome" value="Nome: " />
									<p:inputText id="nome" value="#{cadastroBean.nome}"
										required="true" label="nome" size="80">
										<f:validateLength minimum="15" />
									</p:inputText>
									
									<h:outputLabel for="cpf" value="CPF: " />
									<p:inputText id="cpf" value="#{cadastroBean.cpf}"
										required="true" label="cpf" size="15">
										<f:validateLength minimum="0" maximum="11" />
									</p:inputText>
									
									<h:outputLabel for="email" value="E-mail: " />
									<p:inputText id="email" value="#{cadastroBean.email}"
										required="true" label="email" size="60">
										<f:validateLength minimum="15" />
									</p:inputText>
									
									<h:outputLabel for="dataNascimento" value="Data Nasc.: " />
									<p:inputText id="dataNascimento" value="#{cadastroBean.dataNascimento}"
										required="true" label="dataNascimento" size="15">
										<f:validateLength minimum="0" />
									</p:inputText>
									
									<h:outputLabel for="estadoCivil" value="Estado Civil.: " />
							        <p:selectOneMenu id="estadoCivil" value="#{cadastroBean.estadoCivil}" required="true" style="width:150px;">  
							            <f:selectItem itemLabel="Solteiro" itemValue="0" />  
							            <f:selectItem itemLabel="Casado" itemValue="1" />  
							            <f:selectItem itemLabel="Divorciado" itemValue="2" />  
							            <f:selectItem itemLabel="Viúvo" itemValue="3" />  
							        </p:selectOneMenu> 
								
									<h:outputLabel for="sexo" value="Sexo: " />
									<p:selectOneMenu  id="sexo" value="#{cadastroBean.sexo}" required="true" style="width:150px;">  
							            <f:selectItem itemLabel="Masculino" itemValue="0" />  
							            <f:selectItem itemLabel="Feminino" itemValue="1" />  
							        </p:selectOneMenu> 
									
									<h:outputLabel for="nacionalidade" value="Nacionalidade: " />
									<p:inputText id="nacionalidade" value="#{cadastroBean.nacionalidade}"
										required="true" label="nacionalidade" size="30">
										<f:validateLength minimum="0" />
									</p:inputText>

									<h:outputLabel for="endereco" value="Endereco: " />
									<p:inputText id="endereco" value="#{cadastroBean.endereco}"
										required="true" label="enderecov" size="80">
										<f:validateLength minimum="0" />
									</p:inputText>
									
									<h:outputLabel for="cidade" value="Cidade: " />
									<p:inputText id="cidade" value="#{cadastroBean.cidade}"
										required="true" label="cidade" size="40">
										<f:validateLength minimum="0" />
									</p:inputText>
									
									<h:outputLabel for="bairro" value="Bairro: " />
									<p:inputText id="bairro" value="#{cadastroBean.bairro}"
										required="true" label="bairro" size="40">
										<f:validateLength minimum="0" /> 
									</p:inputText>

									<h:outputLabel for="uf" value="UF" />
									<p:selectOneMenu  id="uf" value="#{cadastroBean.uf}" required="true" style="width:180px;">  
							            <f:selectItem itemLabel="Acre" itemValue="AC" />
										<f:selectItem itemLabel="Alagoas" itemValue="AL" />
										<f:selectItem itemLabel="Amapá" itemValue="AP" />
										<f:selectItem itemLabel="Amazonas" itemValue="AM" />
										<f:selectItem itemLabel="Bahia " itemValue="BA" />
										<f:selectItem itemLabel="Ceará" itemValue="CE" />
										<f:selectItem itemLabel="Distrito Federal " itemValue="DF" />
										<f:selectItem itemLabel="Espírito Santo" itemValue="ES" />
										<f:selectItem itemLabel="Goiás" itemValue="GO" />
										<f:selectItem itemLabel="Maranhão" itemValue="MA" />
										<f:selectItem itemLabel="Mato Grosso" itemValue="MT" />
										<f:selectItem itemLabel="Mato Grosso do Sul" itemValue="MS" />
										<f:selectItem itemLabel="Minas Gerais" itemValue="MG" />
										<f:selectItem itemLabel="Pará" itemValue="PA" />
										<f:selectItem itemLabel="Paraíba" itemValue="PB" />
										<f:selectItem itemLabel="Paraná" itemValue="PR" />
										<f:selectItem itemLabel="Pernambuco" itemValue="PE" />
										<f:selectItem itemLabel="Piauí" itemValue="PI" />
										<f:selectItem itemLabel="Rio de Janeiro" itemValue="RJ" />
										<f:selectItem itemLabel="Rio Grande do Norte" itemValue="RN" />
										<f:selectItem itemLabel="Rio Grande do Sul" itemValue="RS" />
										<f:selectItem itemLabel="Rondônia" itemValue="RO" />
										<f:selectItem itemLabel="Roraima" itemValue="RR" />
										<f:selectItem itemLabel="Santa Catarina" itemValue="SC" />
										<f:selectItem itemLabel="São Paulo" itemValue="SP" />
										<f:selectItem itemLabel="Sergipe" itemValue="SE" />
										<f:selectItem itemLabel="Tocantins" itemValue="TO" />
							        </p:selectOneMenu> 
									
									<h:outputLabel for="cep" value="CEP: " />
									<p:inputText id="cep" value="#{cadastroBean.cep}"
										required="true" label="cidade" size="15">
										<f:validateLength minimum="0" />
									</p:inputText>
								</h:panelGrid>							
							</p:panel>

							<!-- DADOS PROFISSIONAIS -->
							<p:panel id="panelDadosProfissionais" header="Dados Profissionais" style="margin-bottom:10px;width:970px;">
								<p:accordionPanel>  
								    <p:tab title="Experiência Profissional">  
								    	<h:panelGrid columns="2" border="0">
											<h:outputLabel for="empresa" value="Empresa: " />
											<p:inputText id="empresa" value="#{cadastroBean.empresa}"
												required="true" label="empresa" size="70">
												<f:validateLength minimum="0" />
											</p:inputText>
	
											<h:outputLabel for="cargoFuncao" value="Cargo/Função: " />
											<p:inputText id="cargoFuncao" value="#{cadastroBean.cargoFuncao}"
												required="true" label="cargoFuncao" size="50">
												<f:validateLength minimum="0" />
											</p:inputText>
	
											<h:outputLabel for="dataIni" value="Data inicial: " />
											<p:inputText id="dataIni" value="#{cadastroBean.dataIni}"
												required="true" label="dataIni" size="8">
												<f:validateLength minimum="0" />
											</p:inputText>
	
											<h:outputLabel for="dataFim" value="Data final: " />
											<p:inputText id="dataFim" value="#{cadastroBean.dataFim}"
												required="true" label="dataFim" size="8">
												<f:validateLength minimum="0" />
											</p:inputText>
	
											<h:outputLabel for="descricaoAtividade" value="Descrição das Atividades: " />
											<p:inputTextarea id="descricaoAtividade" rows="5" cols="60" counter="counter" maxlength="400" value="#{cadastroBean.descricaoAtividade}"       
												    		 counterTemplate="{0} characters remaining." autoResize="false"/>
											<h:outputText id="counter" />
											
											<p:commandButton id="btnIncluirDadosProfissionais" icon="ui-icon-locked" title="Incluir" value="Incluir" />
											<p:message for="descricaoAtividade" />
										</h:panelGrid>

										<p:dataTable var="listaExperiencia" value="#{cadastroBean.experienciasProfissionais}">  
									        <p:column headerText="Empresa">  
									            <h:outputText value="#{listaExperiencia.empresa}" />  
									        </p:column>  
									  
									        <p:column headerText="Inicio">  
									            <h:outputText value="#{listaExperiencia.dataIni}" />  
									        </p:column>  
									  
									        <p:column headerText="Término">  
									            <h:outputText value="#{listaExperiencia.datafim}" />  
									        </p:column>  
									  
									        <p:column headerText="Descrição das Atividades">  
									            <h:outputText value="#{listaExperiencia.descricaoAtividade}" />  
									        </p:column>  
									    </p:dataTable>  
								    </p:tab>  
								    
								    <!-- CURSOS -->
								    <p:tab title="Cursos">  
								    	<h:panelGrid columns="2" border="0">
											<h:outputLabel for="instituicaoCurso" value="Instituição: " />
											<p:inputText id="instituicaoCurso" value="#{cadastroBean.instituicao}"
												required="true" label="instituicaoCurso" size="80">
												<f:validateLength minimum="0" />
											</p:inputText>
	
											<h:outputLabel for="nomeCurso" value="Nome do Curso: " />
											<p:inputText id="nomeCurso" value="#{cadastroBean.nomeCurso}"
												required="true" label="nomeCurso" size="80">
												<f:validateLength minimum="0" />
											</p:inputText>
	
											<h:outputLabel for="dataConclusao" value="Data conclusão: " />
											<p:inputText id="dataConclusao" value="#{cadastroBean.dataConclusao}"
												required="true" label="dataConclusao" size="9">
												<f:validateLength minimum="0" />
											</p:inputText>
	
											<h:outputLabel for="cargaHoraria" value="Carga Horária: " />
											<p:inputText id="cargaHoraria" value="#{cadastroBean.cargaHoraria}"
												required="true" label="cargaHoraria" size="5">
												<f:validateLength minimum="0" />
											</p:inputText>
	
											<p:commandButton id="btnIncluirCursos" icon="ui-icon-locked" title="Incluir" value="Incluir" />
											<p:message for="descricaoAtividade" />
										</h:panelGrid>
										
										<p:dataTable var="cursos" value="#{cadastroBean.cursos}">  
									        <p:column headerText="Instituição">  
									            <h:outputText value="#{cursos.instituicaoCurso}" />  
									        </p:column>  
									  
									        <p:column headerText="Nome do Curso">  
									            <h:outputText value="#{cursos.nomeCurso}" />  
									        </p:column>  
									  
									        <p:column headerText="Conclusão">  
									            <h:outputText value="#{cursos.dataConclusao}" />  
									        </p:column>  
									        
									        <p:column headerText="Carga Horária">  
									            <h:outputText value="#{cursos.cargaHoraria}" />  
									        </p:column>  
									    </p:dataTable>  
								    </p:tab>  
								    
								    <!-- OUTROS CONHECIMENTOS -->
								    <p:tab title="Outros Conhecimentos">  
								    	<h:panelGrid columns="2" border="0">
											<h:outputLabel for="descricao" value="Descrição: " />
											<p:inputText id="descricao" value="#{cadastroBean.descricao}"
												required="true" label="descricao" size="80">
												<f:validateLength minimum="0" />
											</p:inputText>
	
											<h:outputLabel for="nivel" value="Nivel" />
											<p:selectOneMenu  id="nivel" value="#{cadastroBean.nivel}" required="true" style="width:180px;">  
									            <f:selectItem itemLabel="Básico" itemValue="0" />
												<f:selectItem itemLabel="Intermediário" itemValue="1" />
												<f:selectItem itemLabel="Avançado" itemValue="2" />
											</p:selectOneMenu>
											
											<p:commandButton id="btnIncluirOutrosConhecimentos" icon="ui-icon-locked" title="Incluir" value="Incluir" />
											<p:message for="descricaoAtividade" />
										</h:panelGrid>
										
										<p:dataTable var="formacoes" value="#{cadastroBean.formacoes}">  
									        <p:column headerText="Descrição">  
									            <h:outputText value="#{formacoes.descricao}" />  
									        </p:column>  
									  
									        <p:column headerText="Nível">  
									            <h:outputText value="#{formacoes.nivel}" />  
									        </p:column>
									        
									    </p:dataTable>  
								    </p:tab>

									<!-- FORMACAO -->								      
								    <p:tab title="Formação">  
								    	<h:panelGrid columns="2" border="0">
											<h:outputLabel for="instituicao" value="Instituição: " />
											<p:inputText id="instituicao" value="#{cadastroBean.instituicao}"
												required="true" label="instituicao" size="80">
												<f:validateLength minimum="0" />
											</p:inputText>
	
											<h:outputLabel for="anoConclusao" value="Ano conclusão: " />
											<p:inputText id="anoConclusao" value="#{cadastroBean.anoConclusao}"
												required="true" label="anoConclusao" size="5">
												<f:validateLength minimum="0" />
											</p:inputText>
	
											<h:outputLabel for="nomeFormacao" value="Nome do Curso: " />
											<p:inputText id="nomeFormacao" value="#{cadastroBean.nomeFormacao}"
												required="true" label="nomeFormacao" size="80">
												<f:validateLength minimum="0" />
											</p:inputText>
											
											<p:message for="descricaoAtividade" />
										</h:panelGrid>
										
										<p:dataTable var="formacoes" value="#{cadastroBean.formacoes}">  
									        <p:column headerText="Instituição">  
									            <h:outputText value="#{formacoes.instituicao}" />  
									        </p:column>  
									  
									        <p:column headerText="Conclusão">  
									            <h:outputText value="#{formacoes.anoConclusao}" />  
									        </p:column>  
									  
									        <p:column headerText="Nome do Curso">  
									            <h:outputText value="#{formacoes.nomeFormacao}" />  
									        </p:column>  
									    </p:dataTable>  
								    </p:tab>  
								</p:accordionPanel>  
							</p:panel>
							
							<!-- LOGIN -->
							<p:panel id="panelLogin" header="Login" style="margin-bottom:10px;width:970px;">
								<h:panelGrid columns="2" border="0">	
									<h:outputLabel for="login" value="Login: " />
									<p:inputText id="login" value="#{cadastroBean.usuario}"
										required="true" label="login" size="15">
										<f:validateLength minimum="2" />
									</p:inputText>
								
									<h:outputLabel for="senha" value="Senha: " />
									<p:inputText id="senha" value="#{cadastroBean.usuario}"
										required="true" label="Senha" size="15" />
				
									<p:commandButton id="btnSalvar" icon="ui-icon-locked" title="Salvar" value="Salvar" actionListener="#{cadastroBean.salvar}" />
									<p:message for="senha" />
									
								</h:panelGrid>
							</p:panel>
				
						</h:form>
					</div>
				</ui:insert>
			</div>
			<div id="rodape1" class="fonteRodape fonteBranca textoCentralizado">
				<ui:insert name="rodape">
					<ui:include src="../template/rodape.xhtml" />
				</ui:insert>
			</div>
			<div id="bordaBaixoGeral1"></div>
		</div>
	</div>

</h:body>

</html>